removed unnecessary function context preservation