merge init and open for test