init with code