Court says writ petitions are maintainable