add async computing and refactor algorithm methods