update schema for function and tests final