come up with a better implementation of database population