optimize single value lookup
add comments