add config fuctions to api
add reference iterator, passes tests