added support for resizing and moving output