my realisation of good old snake