[feat] added main class wrapping function's context