refact
implement create instance