add converting method to insert method