test the init logic