cleaned up #27 code block a bit