used casted pointer to avoid calng compilation error