implemented the update status query