Changed two database methods