second script for conditional statement added