fixed main() while loop bug, || became && and fixed it