Added prompt function to code.