speed up by using batch lookups