Converted back to framework code from core code