updated from code reivew