Refactor normal code