refactore code to new experience