Got lookup by bit mask working.