finish command_S, need to fix command_P