Version 1 solution