moved square into util