refactor fabric into module