re-org and new functions