quick and dirty in py for 010. takes 4s to run