testing the hack from stackoverflow