added adapter and modified layouts