somehow handling empty database