minor cleanup, add clock() calls