added a custom result handler