working on square functionality