update + refactor