added precompute functionality and faster load