improved code, greatly refactored provider classes