updated comments, improved test