Move prompt function definition into separate module