refactor and updating