add "val" to the class definition