Implemented different algorithm under water.