some renaming and  comments help to read, nothing important