inputCheck method