made standalone version and removed transpose