Create function6