[NEW] added function for reading user input