make contact id dynamic with check of max id

resolve potential constraint failure encountered with hard-coded contact id