implemented most of classifier