taken out some printfs, final time is 2.0ms