cleaned up and namespaceing