updated for new functions
updated for new functions