Trying to simplify db scanner