remove TODOs and change type check