added direct port manipulation