moved init() to constructor