removed loop in transformation()