Update Depth_functions.R