improved version of our MHacks entry