matching students now works correctly