major update with more comments