major update: now takes command line input