Implement tests for US#11
Fix code for US#11
Implement tests for US#12
Fix code for US#11