getval and setval unnecessary abstractions