add check for existing id