Added tests for new functionality