cleaned up some comments, added a helper func for input sanitization