Functions 5 and 6 inputted