Also I think we should extract these conditionals to a method.