Adding functionallity

Adding functionallity to the library as well as tests