added Zero wall detection