some mini-modifications for slightly higher throughput