rewriting swarm witha custom replacement