function pointer typecasts set for correct size