Updaing library to be more generalized