adding board boundaries, clearing lines and shape stacking