refined final version