updated get_characters fxn, should be more rrobust, added test for get_characters
merged changes