fixed so runs through command line