fix mutual recursive functions