first try of mean img, to be testd