handled some special cases of inputs