better comments and documentation