changed the wait for value to the smaller value