changed method argument from String to Class<?>. reflected changes
acordingly. updated test cases