taken out a buncha stuff not used. final time is around 6-7ms