schema script
calc function