tiny changes to speed up program