added constraints functionality to separate submodule