revised the debug version of water sim