Added the initialize method in the extension

Closes #47