adapt library to STM project