Added snailbot's code