Added some changes to the adapter