logging added in onClick
see code changes