updated to sample at different depths