Made changes into if then statement