change method to averaging RGB