This whole section is not tested. Can you add a few tests for this part too? Thank you :)