add square constraint