more simplification and correct comments