sanity checks update for input parameters and removing ambiguous code