updating PR to address second round of comments: else if, function name standard, etc