Edited blog 2 code