added getValue function