Assignment completed

Made the two functions for the assignment