made resize generic object
more generic functions for resize, resize added to inplace