type changes from factor to numeric