Almost functional. Extrapolation not working