version 2 - refactored to be modular
fixed incorrectly referenced namespacing