db upload tool, wrote functions file