create or replace functions for bmps and bsfs update with pte and baseline