Added a readme. Corrected the logic