first working version with basic four calcs