fix. have the code work even where there is no function