fix to bin res function and added abundance map to dgam function