Simple working version fully unit tested