fixed James' merged code that used old column name key