implementd resize and deresize methods; close #10