added support for resize