added squares based domain and problem