version 1 for insert database