added Val func