added resize support