important refactor and update