moving ugly depth methods to the bottom