added tighter input validation based on revisions from ISB