Intial modifications to the 3 functions.