refatored dep apth