better comments and code structure