added some comments, to clarify type definitions