grabbed a snippet from paradigm. smarter.