code cleaned | new library code