read input from formated file