trying to fix recursive call