commented this code for future readers