edited functions
edited functions for Prog.Ass.2