add for mysql crud function and remove useless code