changed break into return statement for determinepacket