refactored kernel.py