resolving issues with empty labels, whitespace, and calculations