allow classes as arguments for getObjects