modified tax function