Some problems still remaining with constraints. Don't know how to solve it yet