remove naff try except by using arrays rather than generators