Completed adding overlay functionality