added support for horiz and vert constraints