added realtime horizontal and vertical constraints