Around line 196 should be refactored to use this method.