added two fuctions