Updated Adapter Pattern code