add_details function.