Custom delegates with return value implemented