added resizing functions; some minor changes in basic methods