trying with a timed function