add check on empty ids