Code refactor 1