redisgned database and upload working