events database adapted from sample a bit