changed logic
Merge pull request #3 from pillow89/johannes

changed logic