fixed connection function to work with host or full url
writing the parser
partser written
finished main function for tests