clean code suggested by @adamv