changed some internals of snake and modified update loop accordingly