Refactored promptmessage to eliminate input variable