Added poly-time approximation option
Todo: Fix bug on certain inputs