updated with some documentation, threw in a simple util function.