switch to SQL and add file uploading