added depth and rate control