final version with document