Extract aset/aget into functions