assign id automatically