major changes to how resizing is implemented - works well :)