moved showing of result to command