finished function documentation