minor code revision for readability, also updated README