moves the number of openings box and fixes syntax errors