prepare for database
merge