Supreme Court legalises homosexuality