improved title functionality