initial coding
add helper functions for user input