library for callbacks implementation