Added typing, cast still todo