Defining functions for the assignment