adding click events and so on