added init() function