added on selection listener to history adapter and something else which i can't quite remember