rewrite abstract according to comments; correct complilation errors, etc