added code for interaction handlers.