adding pseudo-code for cave