changed how val works