An optimized version of my old library