Functioning command line version