function calc created