cleaning code and adding comments
final changes before uploading