Added function parameter to add titles to plots