added resize
implement base needed methods - constructors, resize, initialize methods, add debug mode checks