Simple Code refactor