Added more variables and added port selection