Refactored to put if/then that tested @given into a method