added the ability to redirect to a given URL, port; first version
code format