Added setAdapter function to mapper