revised according to comments 2-6