- updated for style
- added check for non-empty label