debugged some square layer completion stuff