adding the init() function