added code so it runs on pic32mx devices