addded some functions