Wrapped everything in an initializatiomn function