reduce some of the code size by converting everything to an array