adds border and wall detection
fixed indenting