some minor parsing errors corrected