add overlap function
misc cleanup