Add event system; needs to be tested