defined the view
implemented draggable rectangle