Make it work with different class values