type safe command callbacks