Added an enum for number of patterns... but don't like how i have to do it in javascript... i wish i didn't have to set numbers