task randomiser and restructuring of db