modifications to work with pi