uploading correctly to DB