update engine refactor