minor changes in sec 5, 6