refactored the os driver