making a helper function for inserting acts