Added some additional functions and testing