Finished Important functions