class change functioning, algorithm still under development