Set up better timing, is now passed to function