loops should be working now, but they leak like crazy