All the required functions are finished