edited README and formatted code a bit