remove unnecessary cast