refactored the adapter classes