Added simpler getValue function