added prompt helper function