adding the functions for the assignment