created a seperate adapter class