added check if callback function is allready registered