Added classify subroutine.