got some dumb type casting to work