added logging for time needed to compute the top level function