set up a few handlers