got rid of JPModel warnings by casting