better create function according to rubycritic