refactored provider (issue #5)