replaced simple float arrays with std::vector