stack overflow; fixing to pass in boolean at end!