small modifications for final version