matcher refactored
classfunction