added arg checks to repeat, made function type check special