Fix #84 by returning function instead of string