renamed variable class to value class, and implemented most of the methods in it