fixed no-arg bug in program and added tests