added port change and modified controllers