Implemented polynomial interpolation and passes tests