Migrated transform() method to Hero class