Just think here are too many ```if```...can you find a way make here be more clear:)