implement lexstat main process