add new feature that a callback when  key event exrpiing
fixed expiring feature