added solution and tests