now works as a library