fixed recursive call