Introduced single and renamed validBlock to function findBlock and introduced it 'globally'