fixed output and started working on solving a square