catchy events database code