Created the two events needed for hanging