Refactoring based on @telent's comments