created rating model and moved functionality to new