started implementation of some constraints functions