updated 'if' statements