Update classes.py

memory implementation of cross_check