Updated to not extend outside board boundary