optimised function prompt selection statement