Please add a comment explaining why you transpose, reverse and most importantly mask the data.