updated with new functions