Added code for detecting the inside of a tank