added %defines for port and IP, code will be easy to change in the future