File updated to use pattern arrays