moved computation to constructor of command object