should work now
Merge pull request #1 from pawurb/working_solution

working logic