Final version. Fixed error. Updated comments.