still trying to overcome that bottleneck at the end... working, but not very fast.