retreive dep names from database and change rating server. fix rating sql