unnecessary cast is removed