start refactoring ctx.go