replaced size_t for ff and algorithms with correct enums