add tables utility functions, rewrite install and populate tables part