updated host input loop for switch case