switching to use accept function.