added database function to users