Simplify and closer to original code.