A dynamic model for city size distribution beyond Zipf 's law