print correct address
refactor: moving printing to function
refactor: moving message processing
reply with correct address when listening on 0.0.0.0