Added credits to janosgyerik for the test cases