check depth