Fix license
use factory to replace compose