functionize snowmelt (first virsion)