code refactoring for future compatibility with SkinPoser