Solution to first challenge