added support for autoid