Avalanche Problems

#2 impleneted logic for avalanche problems