add test code for smoothness
add nearest and linear interpolation