changed Cast to be more useable