Create function character