added full model functoinality, fixed prediction type issue