remove subfunctions