trying to speed things up by removing unnecessary gather