added a proper initialization process