Code refactor
ref