added overlay code