fixing deprecated dynamic call