functions
bd