modified genDatabase so it can run on ec2 and create/load db