added command line tag -d to change port