mean function added. first commit.