rewriting add to use resize instead of conservative resize