refactor to enable multiple instances
bring consistency to module API