model implementation against test cases