fixed issue with single instance classification. Code is working now