Added doc function for documentation