READY:refactor and add open option