librarion functions