first implementation of --depth for register