[snake] improve code readability