Update and add new functions