Refactored to save a couple lines and a superfluous if_statement