Based on https://code.google.com/p/cellbots/