writePort now returns 1. addresses issue #31