implement transform for better gpu performance