refactor license