formatted
removed code smells