split module into more fine-grained API