added the adapter class
added some tests