         sprite.call 'commit', coordinates
 
     apply: (world, args) ->
-      {target, action, instruction} = args
+      {target, action, action} = args
       console.log "programs apply: #{world}, {#{target}, #{action}}"
       console.log "edit: #{sprite.get 'editing'} -> #{world.get 'editable'}"
       return unless world.get 'editable'      


    next_index: 0
    reset_index: (world) -> world.put 'next_index', 0
    next_instruction: (world) ->
      current_index = world.get 'next_index'
      instructions = world.find_child('instructions').find_children()

      count = instructions.length
      world.put 'next_index', get_next_index(current_index, count) 

      instructions[current_index]

    tick: (world, args) ->
      return unless world.get 'selected'
      instruction = world.get 'next_instruction'
      sprite.call 'prepare', instruction.get('value') if instruction

    collision: (world, args) ->
      [proposing_sprite, collision_subject, coordinates] = args


    store: (world, action) ->
      console.log "programs store: #{world}, {#{action}}"
      actions_container = world.find_child('actions')
      actions_container.add_child action
  }

  program_row = (name, contents) ->
    program = make.columns name, [
      { _LABEL: 'program_name', name: name }
      make.buttons("action", contents, my.command)
    ]
    my.extend program, program_behavior()

