implemented 'init' functionality