updated code for sequence id of DB.