updated some functions