simplify and refactor codes
change names