differnt functions implemented