Currently not working -> turning code into library