shouldn't you check that callback is a function ?