updated and generalized broken extract functions