commented and made little improvements