use event instead of onclick