Implemented local predictions on the library