added new conditional statement to follow dry principal