Adding some necessary some necessary functions