updated README and revised code for readability