add small functions for key/attr access