improved creating squares in different places