Effects of rock avalanches on glacier behaviour and moraine formation