added functions for classification