this is what the previous function did anyway!