pulled diamond square functionality out to separate class