optimize cell allocation