WIP - complete algorithm w in types2