changed isDoorway funtion