addition of wall and wall moving logic more accurate