Added format function to commands