added function to handle interfacing with user.