Started writing register query