updadted functions