update border and snake