over all refactor