interrupt based implementation