fixed input, started work on code