more work on statement handler