Recalculate script mainly finished