refactored, added some driver tests