Wrap the objID calculation into a separate function?