refactor decorator