updated adapter class