change function name to handleClick
fix unit tests