added methods to read input from stdin