add id generator and tests