refactor mruby method(fix indent. remove temporary value etc)