Moved Initiation into function