updated database methods