hw5 snake