moved execution of the action into the main function, rather than having execution happen in the prompt function, which was weird