standardized calculation functions
fixed graph