refactor & add a map implement

refactor & add a map implement