added code to convert depth value to a number