changed conditions to follow only water.isFrameNew()