follow naming conventions, use more descriptive string checking, add more comments