Add working command_prompt function