fixed new init function