added destructuring and removed destructuring from functions
added namespaces