adding q_val functions to data retrieval files and the data test file