simplifed for computation in class