Lawmakers in Massachusetts are scrambling to revise state law after the state's high court ruled it was technically legal to secretly take pictures underneath a woman's skirt.

The practice--commonly known as "upskirting"--does not technically violate the law because the women who were photographed were not nude or partially nude.

"A female passenger on a MBTA trolley [subway system] who is wearing a skirt, dress, or the like covering these parts of her body is not a person who is 'partially nude,' no matter what is or is not underneath the skirt by way of underwear or other clothing," wrote Justice Margot Botsford of the state Supreme Judicial Court.

Thirty-two-year-old Michael Robertson was arrested and accused in 2010 of using his cell phone to take pictures up the skirts of women riding the subway system, CNN reported.

The ruling effectively reversed a lower court's decision that refused a motion from Robertson seeking to dismiss the case.

Robertson's lawyers successfully argued that the women he "upskirted" were neither nude nor partially nude, nor should they have expected a reasonable expectation of privacy.

State law "does not apply to photographing (or videotaping or electronically surveilling) persons who are fully clothed and, in particular, does not reach the type of upskirting that the defendant is charged with attempting to accomplish on the MBTA," the court said.

The court admitted the defendant's actions should be illegal,  reported Boston ABC affiliate, WCVB.

[via CNN, WCVB]