Logic for interpolation added