quick refactor
Merge pull request #2 from jimroh/modify-base-code

quick refactor