changed enum to c++11 and added structures for join algorithms