added feature to auto populate caption on select code text