implementing snake register action