added option for custom id generator
add test