updated functions