tiny cleanup and add comment to function