better comments and code formating