Made interests parsing function more flexible