added check for custom commands so that we can use the constructor format