major changes based on referee's suggestions