refactor using EC5 style