getting and setting the currval