working data connection and upload to db