Attempted to add a way for the code to end when greater than 3