added text to README
minor code rearrangement