add ids
fix test
add method to get max id
fix tests