added modifications after JLO's review