added state binding to handlers.