final version of the paper