Modified function in bak/st