added hacky database stuff