add $2 to port definition
move $0 to module body