move init method to prototype to keep consistent with other code