implemented basic dragging and header buttons functionality