refactor & proper type definition
2.4.0