If-else statements don't display anything, need to implement a loop