Add read me
Fix naming errors and counter
Add comments for what the function is doing.