implemented remove_if, extract_if

TODO add usage in test.cpp