final version without comments