updated for new functions