remove thread sleep, add functional transform to query result