Updated to have 7 arg function.