fixed #1 Added some helpers, not fully tested, test is broken