Optimization of Wavelet Baaed Watermarking for Data Security