working API  constraint controller. cleaner DOM.