the complete version to calc v1