fixed bug in get_markup, added doc strings