make this less verbose
use ets:select instead of two ets:lookup_element

while i don't know which is more efficient, ets:select version
of code is shorter.