almost done with ass-2 on functions