move init method to top