implement cast
typo
add some TODO
safeCall for error detection without failure