added some logic
Merge pull request #2 from esloan/jessl8

added some logic