added wsExists to gui functions