implemented  David suggestion on kernel over time