added rand to make things interesting, and printhate isn't working as intended.