view overlay function