A model for handwriting recognition using wavelet function and genetic algorithm