Add function for generating squares