refactor resize; exclude from DOS