main:changed port D I/O assignments