add apply-family functions
reorganize packages