this should do it for the database stuff