more graceful solution