changed the inputs and moved where the input stream was