Small change to fucntions, working on documentation