transform class now works properly from dictionary input