add get_capability() , remove some compiler warnings
remove compiler warnings