adding caption code