bug fixes, code re-writing, mostly with swarm fxn