updating typeing in let and function