Changes made to complete the functions