implemented wait for input operations. operations now completely done