added ckecking input