Implemented linear prediction