ugh. stuff. implemented RegisterForMessages that allows an anoynmous function.