finished with full documentation of rws query