input handling from file