generic classification pipleline