error changed radius to r
hard coded mask at one place