first final version with modifications