added new functions, updated old