updated to almost final copy (need comments)