refactor register object & added helper.js