why do i get an "improper procedure call" when i try to average the results of the log function in a query?