remove unnecessary casting