added auto-increment support