added dynamic title functionality