resize (minor modifications)