[change] use define_method for enhance performance
[merge]