avoid typecasts