added other recursive functions