Before attempting to add threading to speed things up