add more comments and more organization