implemented photo gallery & key listender