updated masked_overlay and moved it into overlay.py