Updated with new functions