attempt to improve naming and comments