why do you need to pass handler as argument here?