modified get_title method in Post class