returning average brightness