First solution was incorrect. This second solution is correct