database methods working