resize levels and units