Creating generic adapter.