remove command class and use std::function instead