python is ridiculously slow