new delete problem solution