some refactor. user insert fix