added check if command exists