use variable instead of a second array lookup