Finhished converting into a library