refactoring @velcrin (also implement inderterminate