some small refactors, linear interpolation added