Added comments
fixed bug and updated readme