added few changes to input functions