Final rewrited version