Created code for DB calls and parallelisation - not working yet