prepare imported functions for database insertion