modified for Adapter