Helper functions for command line