add callbacks using boost function