Adding wall following function