tried to applied Trevor's recommendations but still can not get data without doing a loop